package main.service;

import java.util.*;
import org.springframework.stereotype.Service;
import org.springframework.data.domain.Page;
import main.entity.*;
import main.vo.*;



@Service
public class FanhuizfcUserService {

//系统生成代码,请不要修改或删除 <actionStart:zhijiefhdqsj>
	public String zhijiefhdqsj() throws Exception{
        //当前函数的代码为自动生成,请勿手动修改!!!
        return "请求成功";

    }
//系统生成代码,请不要修改或删除 <actionEnd:zhijiefhdqsj>

//系统生成代码,请不要修改或删除 <actionEnd:zhijiefhdqsj>	


	


//系统生成代码,请不要修改或删除 <actionStart:zhazhaoddh>
public String zhazhaoddh(String orderID) throws Exception{
        //当前函数的代码为自动生成,请勿手动修改!!!
        Dingdan order = com.justep.cloud.boot.service.X5ContextService.getInstance(main.repository.DingdanRepository.class).findOne(orderID);
        return order.getFdingdanh();

    }
//系统生成代码,请不要修改或删除 <actionEnd:zhazhaoddh>

	


//系统生成代码,请不要修改或删除 <actionStart:shifouyhpj>
public String shifouyhpj(String orderID, String sys_XCredentialUserId) throws Exception{
        //当前函数的代码为自动生成,请勿手动修改!!!
        java.util.List < Dingdan > Orders = com.justep.cloud.boot.service.X5ContextService.getInstance(main.repository.DingdanRepository.class).queryEntityByFidEqualsAndFyonghuEquals(orderID, sys_XCredentialUserId);
        if ((com.justep.util.ListUtil.isNotEmpty(Orders))) {
            Dingdan currentOrder = com.justep.util.ListUtil.getFirst(Orders);
            if ((!currentOrder.getFmaijiapj().equals(""))) {
                return "您已完成评价";
            } else {
                return "买家评价";
            }
        } else {
            com.justep.cloud.boot.service.X5ContextService.getInstance(main.repository.DingdanRepository.class).queryEntityByFidEqualsAndFmaijiaidEquals(orderID, sys_XCredentialUserId);
            if ((com.justep.util.ListUtil.isNotEmpty(Orders))) {
                Dingdan currentOrder = com.justep.util.ListUtil.getFirst(Orders);
                if ((!currentOrder.getFmaijiapjj16b91b().equals(""))) {
                    return "您已完成评价";
                } else {
                    return "卖家评价";
                }
            } else {
                return "查无此单";
            }
        }

    }
//系统生成代码,请不要修改或删除 <actionEnd:shifouyhpj>


	


//系统生成代码,请不要修改或删除 <actionStart:jianzhaymyrln>
public String jianzhaymyrln(String sys_XCredentialUserId) throws Exception{
        //当前函数的代码为自动生成,请勿手动修改!!!
        if ((org.apache.commons.lang.StringUtils.isBlank(sys_XCredentialUserId))) {
            return "无";
        } else {
            java.util.List < Yonghufjxx > User = com.justep.cloud.boot.service.X5ContextService.getInstance(main.repository.YonghufjxxRepository.class).queryEntityByFyonghuidEquals(sys_XCredentialUserId);
            if ((com.justep.util.ListUtil.isEmpty(User))) {
                return "无";
            } else {
                Yonghufjxx currentUser = com.justep.util.ListUtil.getFirst(User);
                if (!(com.justep.util.DateTimeUtil.fromNowSeconds(currentUser.getFshoudaozhytxxdsj()) > com.justep.util.DateTimeUtil.fromNowSeconds(currentUser.getFzuihouycfwltlbdsj()))) {
                    return "无";
                } else {
                    return "有";
                }
            }
        }

    }
//系统生成代码,请不要修改或删除 <actionEnd:jianzhaymyrln>



	






	

}